package generic.gui.util;

import java.awt.BorderLayout;

@SuppressWarnings("serial")
public class JTextLabelHorizontalForm extends JPanelForm {

		private JLabelForm label;
		private JTextFieldForm text;

		public JTextLabelHorizontalForm(String name) {
			BorderLayout bl = new BorderLayout();
			bl.setHgap(0);
			setLayout(bl);
			
			getLabel().setText(name);
			
			add(getLabel(), BorderLayout.WEST);
			add(getText());
		}

		public JLabelForm getLabel() {
			if (label == null) {
				label = new JLabelForm();
				label.setLayout(null);
			}
			return label;
		}

		public void setLabel(JLabelForm label) {
			this.label = label;
		}

		public JTextFieldForm getText() {
			if (text == null) {
				text = new JTextFieldForm();
				text.setLayout(null);
			}
			return text;
		}

		public void setText(JTextFieldForm text) {
			this.text = text;
		}
}
